<!--
 * @Author: sundeqi
 * @Date: 2022-03-29 16:56:56
 * @LastEditors: sundeqi
 * @LastEditTime: 2022-03-30 12:06:52
 * @Description: 抖音直播iframe
-->

<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title>Tiktok Live Stream</title>
    <meta name="viewport"
        content="width=device-width,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <!--[if IE]><script src="js/excanvas.js"></script><![endif]-->
    <script>
        // window.onload = function () {
        //     //var query = window.location.search.substring(1);
        //     var src = 'https://www.tiktok.com/@scout2015/video/6718335390845095173';
        //     loadSrc(src);
        // };

        function loadSrc(src) {
            //var embed = document.getElementsByClassName('tiktok-embed');
            var arrUrl = src.split("/");
            var videoId = arrUrl[arrUrl.length - 1]
            // embed.setAttribute("data-video-id", videoId);
            // embed.cite = src;
            document.getElementById('liveContainer').innerHTML = '<blockquote class="tiktok-embed" cite="' + src +
                '"  data-video-id="' + videoId +
                '" style="max-width: 605px;min-width: 325px;"> <section> </blockquote>';
        }

        // function hideBlank(){
        //     let win =document.getElementsByTagName('iframe')[0].contentWindow;

        //     let doc = win.document;

        //     let html  = doc.getElementsByTagName('html')[0];
        // }
    </script>
    <link href="style.css" rel="stylesheet" type="text/css" />
</head>

<body>
    <!-- 备注 https://www.tiktok.com/oembed?url=https://www.tiktok.com/@scout2015/video/6718335390845095173-->
    <div id="liveContainer"></div>

    <!-- <blockquote class="tiktok-embed" cite="" data-video-id="" style="max-width: 605px;min-width: 325px;">
        <section>
            <a target="_blank" title="@scout2015" href="https://www.tiktok.com/@scout2015">@scout2015</a> Scramble
            up ur name &#38; I’ll try to guess it😍❤️ <a title="foryoupage" target="_blank"
                href="https://www.tiktok.com/tag/foryoupage">#foryoupage</a> <a title="petsoftiktok" target="_blank"
                href="https://www.tiktok.com/tag/petsoftiktok">#petsoftiktok</a> <a title="aesthetic" target="_blank"
                href="https://www.tiktok.com/tag/aesthetic">#aesthetic</a> <a target="_blank"
                title="♬ original sound - tiff" href="https://www.tiktok.com/music/original-sound-6689804660171082501">♬
                original sound - tiff</a>
        </section>
    </blockquote> -->
    <script async src="https://www.tiktok.com/embed.js"></script>
</body>

</html>